<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<h3>Account Information</h3> 
<div style="height: 15px;" class="questionnaire_submit_button"></div>
<table id="accountInfo">
	<tr>
		<td>
			<img style="max-height: 150px; margin-right: 30px;" alt="profilepic" src="${person.pictureUrl}">
		</td>
		<td>
			<c:choose>
				<c:when test="${user.firstName ne null}">
					<p class="account_label_p"><span class="account_label">Name : </span> <c:out value="${user.firstName}"></c:out> <span style="margin-left: 5px;"></span> <c:out value="${user.lastName}"></c:out></p>
					<p class="account_label_p"><span class="account_label"> </span> <c:out value="${person.headline}"></c:out></p>
					<p class="account_label_p"><span class="account_label"></span> <c:out value="${person.location.name}"></c:out></p>	
				</c:when>
				<c:otherwise>
					<p class="account_label_p"><span class="account_label">Company Name : </span> <c:out value="${user.companyName}"></c:out></p>
					<p class="account_label_p"><span class="account_label"></span> <c:out value="${person.location.name}"></c:out></p>
				</c:otherwise>
			</c:choose>
			
			<p>
			
			<hr>
			
			<c:forEach items="${answers}" var="answer">
				<c:set value="${answer.questionId }" var="qid"></c:set>
				<c:set value="${qid ne 256 && qid ne  1006 && qid ne  255  && qid ne  254 }" var="allow"></c:set>
				
				<c:choose>
					<c:when test="${allow }">
						<c:choose>
							<c:when test="${answer.answerDesc != null}">
								${answer.answerDesc }<br>
							</c:when>
							<c:when test="${not empty answer.optionValues}">
								<c:choose>
									<c:when test="${answer.questionId eq 1009 }">
										
									</c:when>
									<c:otherwise>
										<c:forEach items="${answer.optionValues }" var="optValue">
											<c:out value="${optValue }"></c:out><br>
										</c:forEach>
									</c:otherwise>
								</c:choose>
								
							</c:when>
							<c:otherwise>
								<c:out value="${answer.answer}"></c:out><br>
							</c:otherwise>
						</c:choose>
					</c:when>
				</c:choose>
				
			</c:forEach>
			</p>
			<hr>
			<p>
				<span class="account_label">Activities</span> <a id="edit_activities" href="javascript:void(0)">Edit</a><br> 
				<c:forEach items="${user.activityTypeValues}" var="optValue"> 
					<span style="margin-left: 10px"><c:out value="${optValue }"></c:out></span><br>
				</c:forEach>
			</p>
		</td>
	</tr>
</table>



<style>
	#accountInfo  .account_label_p{
		margin: 0;
		padding: 0;	
	}
	
	#accountInfo  .account_label{
		font-weight: bold;
	}
	
	#accountInfo td{
		padding: 10px;
		vertical-align: top;
	}
	
</style>